using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TouchSwitch : MonoBehaviour
{
    public GameObject back;
    public GameObject front;
    public GameObject right;
    public List<GameObject> objectList;
    // Start is called before the first frame update
    void Start()
    {
        if (TouchDect.IsTouch == true)
        {
            back.SetActive(true);
            front.SetActive(true);
            right.SetActive(true);
            for(int i =0; i< objectList.Count; i ++)
            {
                objectList[i].transform.localScale = Vector3.one * 2;
                objectList[i].GetComponent<RectTransform>().anchoredPosition = new Vector3(96 + i * 200, -160, 0);
            }
        }
        else
        {
            back.SetActive (false);
            front.SetActive(false);
            right.SetActive(false);
            for (int i = 0; i < objectList.Count; i++)
            {
                objectList[i].transform.localScale = Vector3.one * 1;
                objectList[i].GetComponent<RectTransform>().anchoredPosition = new Vector3(48 + i * 128, -92, 0);
            }
        }
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
